<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" src="js/jquery-3.5.0.js"></script>
    <link rel="stylesheet" type="text/css" href="bootstrap/bootstrap.min.css">
    <script type="text/javascript" src="bootstrap/jquery.min.js"></script>
    <script type="text/javascript" src="bootstrap/popper.min.js"></script>
    <script type="text/javascript" src="bootstrap/bootstrap.min.js"></script>
    <script src="Vue/Vue.js"></script>
    <script src="Vue/axios.js"></script>
</head>
<body>
    <div id="app">
        <input type="file" ref="file">
        <input type="button" value="上传" @click="up()">
        <video width="320" height="240" controls autoplay>
            <source src="/classteacher/video/afda7b3a-aae0-434e-863f-092976761f83.mp4" type="video/mp4">
        </video>
    </div>
    <script>
        new Vue({
            el: "#app",
            methods: {
                up: function () {
                    console.log(this.$refs.file.files[0]);
                    var formData = new FormData();
                    formData.append("file", this.$refs.file.files[0]);
                    axios.post("classteacher/upVideo", formData).then(res => function () {

                    });
                }
            }
        });
    </script>
</body>
</html>